package lc.com.lcpicturebackend.service;

import lc.com.lcpicturebackend.model.dto.thumb.DoThumbRequest;
import lc.com.lcpicturebackend.model.entity.Thumb;
import com.baomidou.mybatisplus.extension.service.IService;

import jakarta.servlet.http.HttpServletRequest;

/**
* @author 罗超
* @description 针对表【thumb】的数据库操作Service
* @createDate 2025-05-03 01:25:41
*/
public interface ThumbService extends IService<Thumb> {


    /**
     * 点赞
     * @param doThumbRequest 点赞请求类
     * @param request HttpServletRequest
     * @return Boolean
     */
    Boolean doThumb(DoThumbRequest doThumbRequest, HttpServletRequest request);

    /**
     * 取消点赞
     * @param doThumbRequest 点赞请求类
     * @param request HttpServletRequest
     * @return Boolean
     */
    Boolean undoThumb(DoThumbRequest doThumbRequest, HttpServletRequest request);

    /**
     * 是否点赞
     * @param pictureId 图片id
     * @param userId 用户id
     * @return Boolean
     */
    Boolean hasThumb(Long pictureId,Long userId);

}
